# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=tflint
pkgver=0.51.0
pkgrel=0
pkgdesc="A linter for Terraform code"
license="MIT"
arch="all"
makedepends="go"
url="https://github.com/terraform-linters/tflint"
source="tflint-$pkgver.tar.gz::https://github.com/terraform-linters/tflint/archive/v$pkgver.tar.gz"
options="!check" #No tests

export GOFLAGS="$GOFLAGS -modcacherw"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -o tflint-bin
}

package() {
	install -Dm755 $srcdir/tflint-$pkgver/tflint-bin $pkgdir/usr/bin/tflint
}

sha512sums="
efd902facfeb8c1226f7b065c690177b5f303b491c5a4334fd113c42e588096c9758be3a51a7c91b5ef3358e3d4c73d74a4309aff4044cee255d7e45d7b021c0  tflint-0.51.0.tar.gz
"
